import request from '@/utils/request'
export default{

    findNodes() {
        return request({
          url: `/system/menu/findNodes`,
          method: 'get',
        })
    },
    saveMenu(menu){
      return request({
          url: `/system/menu/insertMenu`,
          method: 'post',
          data: menu
        })
    },
    getMenuById(id){
        return request({
            url: `/system/menu/getMenuById/${id}`,
            method: 'get',
          })
    },
    getParentMenuByParentId(id){
      return request({
          url: `/system/menu/getParentMenuByParentId/${id}`,
          method: 'get',
        })
  },
    updateMenu(menu){
        return request({
            url: `/system/menu/updateMenu`,
            method: 'post',
            data:menu
          })
    },
    removeMenuById(id){
        return request({
            url: `/system/menu/removeMenuById/${id}`,
            method: 'delete',
          })

    },
}